<html>
<head><meta charset="utf-8"><title>building clippy · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html">building clippy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206302807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/206302807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#206302807">(Aug 07 2020 at 19:59)</a>:</h4>
<p>How do I build clippy from source? I looked in the CONTRIBUTING.md in rust-lang/rust-clippy, but I couldn't find anything. I tried running <code>cargo build</code> and got this:</p>
<div class="codehilite"><pre><span></span><code>error[E0463]: can&#39;t find crate for `rustc_ast`
  --&gt; clippy_lints/src/lib.rs:23:1
   |
23 | extern crate rustc_ast;
   | ^^^^^^^^^^^^^^^^^^^^^^^ can&#39;t find crate

error: aborting due to previous error
</code></pre></div>



<a name="206302858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/206302858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#206302858">(Aug 07 2020 at 19:59)</a>:</h4>
<p>You need to <code>rustup component add rustc-dev</code> and <code>rustup component add llvm-tools-preview</code></p>



<a name="206303211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/206303211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#206303211">(Aug 07 2020 at 20:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Hmm, it's still not working (same error)...</p>



<a name="206303293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/206303293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#206303293">(Aug 07 2020 at 20:03)</a>:</h4>
<p>Is there a section in the docs about how to build clippy that I missed?</p>



<a name="206306739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/206306739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#206306739">(Aug 07 2020 at 20:40)</a>:</h4>
<p>Ah, it seems I needed to install the component for nightly</p>



<a name="215283513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/215283513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#215283513">(Nov 02 2020 at 06:40)</a>:</h4>
<p><span class="user-mention" data-user-id="282466">@Dhruv Jauhar</span></p>



<a name="215283604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/215283604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dhruv Jauhar <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#215283604">(Nov 02 2020 at 06:42)</a>:</h4>
<p>On running <code>rustup component add ____</code> I get <code>error: master is a custom toolchain</code>, I am trying to use a custom rust build with clippy</p>



<a name="216715084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715084">(Nov 14 2020 at 08:12)</a>:</h4>
<p><span class="user-mention" data-user-id="282558">@Dhruv Jauhar</span> does <code>x.py build src/tools/clippy</code> do what you want?</p>



<a name="216715092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715092">(Nov 14 2020 at 08:12)</a>:</h4>
<p>it depends if you're building in tree or out of tree</p>



<a name="216715231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715231">(Nov 14 2020 at 08:17)</a>:</h4>
<p>I think we tried the same but with test, but remember it didn't working. Lemme give it another shot</p>



<a name="216715274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715274">(Nov 14 2020 at 08:18)</a>:</h4>
<p>test --stage 0 is currently broken (<a href="https://github.com/rust-lang/rust/issues/78778">https://github.com/rust-lang/rust/issues/78778</a>), but I think test --stage 1 will work ( <span aria-label="fingers crossed" class="emoji emoji-1f91e" role="img" title="fingers crossed">:fingers_crossed:</span>)</p>



<a name="216715282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715282">(Nov 14 2020 at 08:19)</a>:</h4>
<p>Actually I think I got serde redifinition errror.</p>
<p>:trying:</p>



<a name="216715333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216715333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216715333">(Nov 14 2020 at 08:20)</a>:</h4>
<p>It's compiling <span aria-label="fingers crossed" class="emoji emoji-1f91e" role="img" title="fingers crossed">:fingers_crossed:</span></p>



<a name="216716706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716706">(Nov 14 2020 at 08:51)</a>:</h4>
<p>it worked <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="216716708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716708">(Nov 14 2020 at 08:51)</a>:</h4>
<p>thanks</p>



<a name="216716717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716717">(Nov 14 2020 at 08:51)</a>:</h4>
<p>you're welcome :)</p>



<a name="216716721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716721">(Nov 14 2020 at 08:51)</a>:</h4>
<p>if I could get --stage 0 working it would take half the time</p>



<a name="216716927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716927">(Nov 14 2020 at 08:55)</a>:</h4>
<p>I usually run --stage1 tests, so I'm fine with it, haha</p>



<a name="216716949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716949">(Nov 14 2020 at 08:55)</a>:</h4>
<p>right, yes, but that only builds rustc once</p>



<a name="216716952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716952">(Nov 14 2020 at 08:55)</a>:</h4>
<p><code>build --stage 1 src/tools/clippy</code> builds rustc twice</p>



<a name="216716998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216716998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216716998">(Nov 14 2020 at 08:56)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#understanding-stages-of-bootstrap">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#understanding-stages-of-bootstrap</a></p>



<a name="216761093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761093">(Nov 15 2020 at 01:09)</a>:</h4>
<p>Is this because it builds stage0 from beta, stage1 from stage0, and then clippy from stage1?</p>



<a name="216761096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761096">(Nov 15 2020 at 01:09)</a>:</h4>
<p>right</p>



<a name="216761143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761143">(Nov 15 2020 at 01:10)</a>:</h4>
<p>Ah I guess for my current purposes stage0 will be quicker <span aria-label="stuck out tongue" class="emoji emoji-1f61b" role="img" title="stuck out tongue">:stuck_out_tongue:</span></p>



<a name="216761150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761150">(Nov 15 2020 at 01:10)</a>:</h4>
<p>Quick question how do I invoke custom-built clippy on a src file?</p>



<a name="216761151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761151">(Nov 15 2020 at 01:10)</a>:</h4>
<p>well yes, but it's broken</p>



<a name="216761152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761152">(Nov 15 2020 at 01:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/78778">https://github.com/rust-lang/rust/issues/78778</a></p>



<a name="216761216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/building%20clippy/near/216761216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/building.20clippy.html#216761216">(Nov 15 2020 at 01:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/122651-general/topic/building.20clippy/near/216761150">said</a>:</p>
<blockquote>
<p>Quick question how do I invoke custom-built clippy on a src file?</p>
</blockquote>
<p>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>